<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>无标题文档</title>
    <script src="angular.min.js"></script>

</head>

<body ng-app="myApp">
<div ng-controller="firstController">
{{name}}

</div>
<script>

    var m1 = angular.module('myApp',[]);



    m1.provider('providerServices01',function(){

        this.$get=function(){

            return {
                message:'this is providerServices01'
            }
        }

    });

    m1.service('serviceServices01',function(){
        return {
            message:'this is serviceServices01'
        }
    })

    console.log(m1);


    m1.controller('firstController',['$scope','providerServices01','serviceServices01',function($scope,providerServices01,serviceServices01){


        console.log(providerServices01);

        console.log(serviceServices01);

        $scope.name='张三';

    }]);

</script>
</body>
</html>
